package com.jreque.persistance;

import java.util.*;
import com.jreque.queue.*;
import java.lang.*;

/**
 * Interface for persistance layer.
 */
public interface IQueuePersistance {
    /**
     * @param task 
     * @return 
     */
    public int enqueueTask(Task task);

    /**
     * @param queueName 
     * @param timeout 
     * @return 
     */
    public Task dequeueTask(String queueName, int timeout);

    /**
     * @param task 
     */
    public void completeTask(Task task);

    /**
     * @param taskID 
     * @return 
     */
    public boolean deleteTask(int taskID);

    /**
     * @param queueName 
     * @return 
     */
    public HashMap getSettings(String queueName);

    /**
     * @param setting 
     * @param queueName 
     * @return 
     */
    public String getSetting(String queueName, String setting);

    /**
     * @param setting 
     * @param value 
     * @param queueName 
     * @return 
     */
    public String addSetting(String queueName, String setting, String value);

    /**
     * @param queueName 
     * @return 
     */
    public HashMap getStats(String queueName);

    /**
     * @param statName 
     * @param value 
     * @param queueName 
     */
    public void incrementStat(String queueName, String statName, int value);
}

